package com.nf;

import com.nf.entity.Car1;
import com.nf.entity.Student2;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestList {
    public static void main(String[] args){
        ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");

//        student2
//        student2Util
//        student2UtilP
        Student2 s2 = (Student2)ac.getBean("student2UtilP");

        System.out.println(s2.getName()+","+s2.getAge()+","+s2.getCar1List());
        for (Car1 i: s2.getCar1List()) {
            System.out.println(i.getName());
        }
    }
}
